import { Notification, Message } from 'element-ui'
import { get } from 'lodash'
import { getUserWorkerList } from '../../api/interface1'

export interface State {}

const state: State = {
  userList: []
}

const getters = {}


const mutations = {

  SET_PRODUCT_LIST(state: any, payload: any) {
    state.userList = payload
  }
}


const actions = {
  //表单数据更新
  async GET_USER_LIST({ commit, state }: any) {
    const resp = await getUserWorkerList()
    let userList = get(resp, 'data', [])
    commit('SET_PRODUCT_LIST', userList)
  }
}


export default {
  namespaced: true,
  state,
  mutations,
  actions,
  getters
}
